package model.requirement3;

// 添加辣椒
public class PepperTopping extends ToppingDecorator {
    public PepperTopping(BasePizza pizza) {
        super(pizza);
    }

    @Override
    public String getDescription() {
        return pizza.getDescription() + ", 加辣椒";
    }

    @Override
    public double getCost() {
        return pizza.getCost() + 1.5; // 辣椒价格
    }
}
